<template>
  <div class="city" >
    <city-header></city-header>
	<city-list :hotList="hotList"  :cityList="cityList"></city-list>
  </div>
</template>

<script>
	import CityHeader from './pages/header'
	import CityList from './pages/list'
	export default{
		components:{
			CityHeader,
			CityList
		},
		data(){
			return{
				hotList:[],
				cityList:{}

			}
		},
		mounted(){
			this.$http.get("/api/datacity.json")
			.then((res)=>{
				const data=res.data.data[0];
				this.hotList=data.hotList;
				this.cityList=data.cityList;
				
			})
		}
	}
</script>

<style scoped>
	.city{
		background-color: #f5f5f5;
	}
</style>